package com.changhongit.order.config;

import java.io.Serializable;

public class ResultModel<T> implements Serializable {

	private static final long serialVersionUID = 8242775031358687150L;

	private T data;

	private Integer status;

	private String msg;

	public void success(T data) {
		this.status = 1;
		this.data = data;
		this.msg = null;
	}

	public void error(String errorMsg) {
		this.status = 0;
		this.data = null;
		this.msg = errorMsg;
	}

	public T getData() {
		return data;
	}

	public void setData(T data) {
		this.data = data;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

}
